<template>
  <div>
    <amount-input v-model="amount" placeholder="请输入金额" @input="getAmount()" clearable ></amount-input>
    <p>父组件中的金额: {{ amount }}</p>
  </div>
</template>

<script>
import AmountInput from "@/components/ThousandthsInput.vue";

export default {
  name: 'App',
  components: {
    AmountInput
  },
  data() {
    return {
      amount: 1234.89 // 初始数字
    };
  },
  methods: {
    getAmount() {
      console.log("输入事件回调");
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
